FROM node:latest
 
RUN mkdir -p /compImg/service
WORKDIR /compImg/service
COPY . /compImg/service
 
RUN npm install -g pnpm
RUN npm install -g cnpm --registry=https://registry.npm.taobao.org
RUN cnpm install pm2 -g
RUN cnpm i
 
EXPOSE 3002
 
CMD [ "pm2-docker", "start", "pm2.json" ]